﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <title>Contact us</title>
    <meta name="description" content="contact us at icomplain" />
    <meta name="keywords" content="contact us" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script type="text/javascript">
        $.validator.setDefaults();

        $(function() {
            // validate the comment form when it is submitted
            $("form:first").validate();

            //            $("#btn").click(function(evt) {
            //                alert($("form:first").validate().form());
            //            });

        });
    </script>

    <h2>
        Contact us</h2>
    <% using (Html.BeginForm())
       {%>
    <%= Html.ValidationSummary(true) %>
    <p>
        Note: * marked are required fields.</p>
    <fieldset>
        <legend>Please provide your name, email address and a comment</legend>
        <p>
            <label for="cname">
                Name</label>
            <em>*</em><input id="cname" name="name" class="required" minlength="2" />
        </p>
        <p>
            <label for="cemail">
                E-Mail</label>
            <em>*</em><input id="cemail" name="email" class="required email" />
        </p>
        <p>
            <label for="curl">
                Subject</label>
            <em>&nbsp;</em><input id="curl" name="subject" value="" />
        </p>
        <p>
            <label for="ccomment">
                Comment</label>
            <em>*</em><textarea id="ccomment" name="comment" class="required" cols="50" rows="5"></textarea>
        </p>
        <p>
            <label for="CaptchaCode">
                Enter code:</label>
            <em>*</em><%=Html.TextBox("CaptchaCode", null, new {@class = "required"})%>
            <img alt="CAPTCHA Code" src="<%=Url.Action("Captcha", "Complaint")%>" />
            <%= Html.ValidationMessage("CaptchaCode")%>
        </p>
        <p>
            <input id="btn" type="submit" class="formbutton" value="Submit" />
        </p>
    </fieldset>
    <%
        }%>
</asp:Content>
